// pages/center/my-charges/my-charges.js
var app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    newrate:'',
    salerate:'',
    orther:'0',
    accessMon:'',
    allMon:''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    wx.setNavigationBarTitle({
      title: '我的佣金',
    })
    this.setData({
      newrate: app.globalData.new_user_rate,
      salerate: app.globalData.sale_rate,
    })
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    let that = this;
    app.post('/withdraw/getAccMoney').then(res=>{
      that.setData({
        accessMon:res.normal,
        allMon: res.total,
      })
    });
  },

  txjl: function(){
    wx.navigateTo({
      url: '../withdraw-record/withdraw-record',
    })
  },
  tixian: function () {
    wx.navigateTo({
      url: '../withdraw-apply/withdraw-apply',
    })
  }

})